import 'package:xin_he/generated/json/base/json_field.dart';
import 'package:xin_he/generated/json/xin_he_order_detail_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class XinHeOrderDetailEntity {
	String? id;
	dynamic userId;
	String? fShopId;
	String? code;
	double? orderFee;
	String? type;
	String? distributionType;
	String? status;
	String? buyerRemark;
	String? createTime;
	dynamic payTime;
	int? remindSend;
	dynamic remindSendTime;
	List<XinHeOrderDetailOrderItems>? orderItems;
	XinHeOrderDetailOrderAddress? orderAddress;
	XinHeOrderDetailShop? shop;

	XinHeOrderDetailEntity();

	factory XinHeOrderDetailEntity.fromJson(Map<String, dynamic> json) => $XinHeOrderDetailEntityFromJson(json);

	Map<String, dynamic> toJson() => $XinHeOrderDetailEntityToJson(this);

	XinHeOrderDetailEntity copyWith({String? id, dynamic userId, String? fShopId, String? code, double? orderFee, String? type, String? distributionType, String? status, String? buyerRemark, String? createTime, dynamic payTime, int? remindSend, dynamic remindSendTime, List<XinHeOrderDetailOrderItems>? orderItems, XinHeOrderDetailOrderAddress? orderAddress, XinHeOrderDetailShop? shop}) {
		return XinHeOrderDetailEntity()
			..id= id ?? this.id
			..userId= userId ?? this.userId
			..fShopId= fShopId ?? this.fShopId
			..code= code ?? this.code
			..orderFee= orderFee ?? this.orderFee
			..type= type ?? this.type
			..distributionType= distributionType ?? this.distributionType
			..status= status ?? this.status
			..buyerRemark= buyerRemark ?? this.buyerRemark
			..createTime= createTime ?? this.createTime
			..payTime= payTime ?? this.payTime
			..remindSend= remindSend ?? this.remindSend
			..remindSendTime= remindSendTime ?? this.remindSendTime
			..orderItems= orderItems ?? this.orderItems
			..orderAddress= orderAddress ?? this.orderAddress
			..shop= shop ?? this.shop;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class XinHeOrderDetailOrderItems {
	String? id;
	String? fUserId;
	String? fOrderId;
	String? fGoodsId;
	String? fGoodsPriceId;
	double? goodsPrice;
	int? goodsAmount;
	double? itemPrice;
	int? zoneType;
	String? status;
	dynamic remark;
	int? versionNum;
	int? removed;
	int? createTime;
	int? updateTime;
	String? fCreateUserId;
	dynamic fUpdateUserId;

	XinHeOrderDetailOrderItems();

	factory XinHeOrderDetailOrderItems.fromJson(Map<String, dynamic> json) => $XinHeOrderDetailOrderItemsFromJson(json);

	Map<String, dynamic> toJson() => $XinHeOrderDetailOrderItemsToJson(this);

	XinHeOrderDetailOrderItems copyWith({String? id, String? fUserId, String? fOrderId, String? fGoodsId, String? fGoodsPriceId, double? goodsPrice, int? goodsAmount, double? itemPrice, int? zoneType, String? status, dynamic remark, int? versionNum, int? removed, int? createTime, int? updateTime, String? fCreateUserId, dynamic fUpdateUserId}) {
		return XinHeOrderDetailOrderItems()
			..id= id ?? this.id
			..fUserId= fUserId ?? this.fUserId
			..fOrderId= fOrderId ?? this.fOrderId
			..fGoodsId= fGoodsId ?? this.fGoodsId
			..fGoodsPriceId= fGoodsPriceId ?? this.fGoodsPriceId
			..goodsPrice= goodsPrice ?? this.goodsPrice
			..goodsAmount= goodsAmount ?? this.goodsAmount
			..itemPrice= itemPrice ?? this.itemPrice
			..zoneType= zoneType ?? this.zoneType
			..status= status ?? this.status
			..remark= remark ?? this.remark
			..versionNum= versionNum ?? this.versionNum
			..removed= removed ?? this.removed
			..createTime= createTime ?? this.createTime
			..updateTime= updateTime ?? this.updateTime
			..fCreateUserId= fCreateUserId ?? this.fCreateUserId
			..fUpdateUserId= fUpdateUserId ?? this.fUpdateUserId;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class XinHeOrderDetailOrderAddress {
	String? id;
	dynamic fUserId;
	String? fOrderId;
	String? name;
	String? telephone;
	String? province;
	String? city;
	String? area;
	String? detail;
	String? type;
	dynamic remark;
	@JSONField(name: "version_num")
	dynamic versionNum;
	dynamic removed;
	dynamic createTime;
	dynamic updateTime;
	dynamic fCreateUserId;
	dynamic fUpdateUserId;

	XinHeOrderDetailOrderAddress();

	factory XinHeOrderDetailOrderAddress.fromJson(Map<String, dynamic> json) => $XinHeOrderDetailOrderAddressFromJson(json);

	Map<String, dynamic> toJson() => $XinHeOrderDetailOrderAddressToJson(this);

	XinHeOrderDetailOrderAddress copyWith({String? id, dynamic fUserId, String? fOrderId, String? name, String? telephone, String? province, String? city, String? area, String? detail, String? type, dynamic remark, dynamic versionNum, dynamic removed, dynamic createTime, dynamic updateTime, dynamic fCreateUserId, dynamic fUpdateUserId}) {
		return XinHeOrderDetailOrderAddress()
			..id= id ?? this.id
			..fUserId= fUserId ?? this.fUserId
			..fOrderId= fOrderId ?? this.fOrderId
			..name= name ?? this.name
			..telephone= telephone ?? this.telephone
			..province= province ?? this.province
			..city= city ?? this.city
			..area= area ?? this.area
			..detail= detail ?? this.detail
			..type= type ?? this.type
			..remark= remark ?? this.remark
			..versionNum= versionNum ?? this.versionNum
			..removed= removed ?? this.removed
			..createTime= createTime ?? this.createTime
			..updateTime= updateTime ?? this.updateTime
			..fCreateUserId= fCreateUserId ?? this.fCreateUserId
			..fUpdateUserId= fUpdateUserId ?? this.fUpdateUserId;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class XinHeOrderDetailShop {
	String? id;
	dynamic iconPath;
	String? name;
	dynamic telephone;
	String? province;
	String? city;
	String? area;
	String? detail;
	String? longitude;
	String? latitude;
	String? fUserId;
	String? address;
	String? remark;
	@JSONField(name: "version_num")
	int? versionNum;
	int? removed;
	String? createTime;
	String? updateTime;
	String? fCreateUserId;
	String? fUpdateUserId;

	XinHeOrderDetailShop();

	factory XinHeOrderDetailShop.fromJson(Map<String, dynamic> json) => $XinHeOrderDetailShopFromJson(json);

	Map<String, dynamic> toJson() => $XinHeOrderDetailShopToJson(this);

	XinHeOrderDetailShop copyWith({String? id, dynamic iconPath, String? name, dynamic telephone, String? province, String? city, String? area, String? detail, String? longitude, String? latitude, String? fUserId, String? address, String? remark, int? versionNum, int? removed, String? createTime, String? updateTime, String? fCreateUserId, String? fUpdateUserId}) {
		return XinHeOrderDetailShop()
			..id= id ?? this.id
			..iconPath= iconPath ?? this.iconPath
			..name= name ?? this.name
			..telephone= telephone ?? this.telephone
			..province= province ?? this.province
			..city= city ?? this.city
			..area= area ?? this.area
			..detail= detail ?? this.detail
			..longitude= longitude ?? this.longitude
			..latitude= latitude ?? this.latitude
			..fUserId= fUserId ?? this.fUserId
			..address= address ?? this.address
			..remark= remark ?? this.remark
			..versionNum= versionNum ?? this.versionNum
			..removed= removed ?? this.removed
			..createTime= createTime ?? this.createTime
			..updateTime= updateTime ?? this.updateTime
			..fCreateUserId= fCreateUserId ?? this.fCreateUserId
			..fUpdateUserId= fUpdateUserId ?? this.fUpdateUserId;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}